import request from '../../../utils/request'

function getMenu() {
  return request({
    url: '/admin/menu/getTree',
    method: 'get'
  })
}

function addMenu(data) {
  return request({
    url: '/admin/menu',
    method: 'post',
    data
  })
}

function editMenu(data) {
  return request({
    url: '/admin/menu',
    method: 'put',
    data
  })
}
function delMenu(data) {
  return request({
    url: '/admin/menu',
    method: 'delete',
    data
  })
}

export { getMenu, addMenu, editMenu, delMenu }
